﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace MPMovieCatalog.Settings.Sections
{
    public class PropertyElement : ConfigurationElement
    {
        public PropertyElement()
            : this("", "")
        {
        }

        public PropertyElement(string name)
            : this(name, "")
        {
        }

        public PropertyElement(string name, string value)
        {
        }

        [ConfigurationProperty("name", IsRequired = true)]
        public string Name
        {
            get
            {
                return (string)this["name"];
            }
            set
            {
                this["name"] = value;
            }
        }

        [ConfigurationProperty("value", IsRequired = true)]
        public string Value
        {
            get
            {
                return (string)this["value"];
            }
            set
            {
                this["value"] = value;
            }
        }

        protected override bool SerializeToXmlElement(System.Xml.XmlWriter writer, string elementName)
        {
            return base.SerializeToXmlElement(writer, elementName);
        }
    }
}
